﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;

namespace XNADota.ContentPipeline.Terrain
{
    [Serializable()]
    [ContentSerializerRuntimeType("XNADota.Terrain.LandscapeConfig, XNADota")]
    public class LandscapeConfigContent
    {
        public LandscapeConfigContent()
        {
        }

        private string _ConfigFilePath;
        private string _WarCraftEnvironmentFileName;
        private string _WarCraftMapDooFileName;
        private string _WarCraftUnitsDooFileName;
        private string _WarCraftCustomUnitsFileName;
        private string _WarCraftPathFileName;
        private string _WarCraftObjectsFileName;

        private float _GridSize;

        private string[] _TexturePaletteFileNames;

        public string ConfigFilePath
        {
            set { if (value.Trim().Length <= 0) throw new Exception("ConfigFilePath can not be null."); _ConfigFilePath = value.Trim(); }
            get { return _ConfigFilePath; }
        }

        public string WarCraftEnvironmentFileName
        {
            set { _WarCraftEnvironmentFileName = value; }
            get { return _WarCraftEnvironmentFileName; }
        }

        public string WarCraftMapDooFileName
        {
            set { _WarCraftMapDooFileName = value; }
            get { return _WarCraftMapDooFileName; }
        }

        public string WarCraftUnitsDooFileName
        {
            set { _WarCraftUnitsDooFileName = value; }
            get { return _WarCraftUnitsDooFileName; }
        }

        public string WarCraftCustomUnitsFileName
        {
            set { _WarCraftCustomUnitsFileName = value; }
            get { return _WarCraftCustomUnitsFileName; }
        }

        public string WarCraftPathFileName
        {
            set { _WarCraftPathFileName = value; }
            get { return _WarCraftPathFileName; }
        }

        public string WarCraftObjectsFileName
        {
            set { _WarCraftObjectsFileName = value; }
            get { return _WarCraftObjectsFileName; }
        }

        public float GridSize
        {
            set { if (value <= 0) throw new Exception(string.Format("GridHeight is {0}, which should be more than 0.", value)); _GridSize = value; }
            get { return _GridSize; }
        }

        public string[] TexturePaletteFileNames
        {
            set { _TexturePaletteFileNames = value; }
            get { return _TexturePaletteFileNames; }
        }
    }
}
